import Vue from 'vue'
import App from './App.vue'
import qs from 'qs'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';
import _global from "./utils/Global";
import api from './api'
import {loginByAppSecret} from './common/loginConfig'
import * as common from './common/common'
import "./assets/fonts/iconfont.css"
import "./assets/fonts/iconfont.js"
import * as echarts from 'echarts'



// 挂载
// 获取websocket
// import {openSocket,getmsg} from './common/PublicSocket.js'

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.prototype.$api=api;
Vue.prototype.$loginByAppSecret=loginByAppSecret;
Vue.prototype.Common=common;
Vue.prototype.$qs = qs;
Vue.prototype.$_global = _global;

Vue.prototype.$echarts = echarts

// websocket
// Vue.prototype.$openSocket = openSocket;
// 获取返回内容
// Vue.prototype.$getmsg = getmsg;

const base64=require('js-base64').Base64
new Vue({
  router,
  store,
  base64,
  render: h => h(App)
}).$mount('#app')

import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
